/**
 * Company : Thai Informatic System Co., Ltd.
 * Created By : Dr.Tree
 * Created On : Jun 28, 2012  12:07:07 AM 
 * e-Mail : chatree@tis.co.th
 * Mobile Phone : (+66) 087-921-5115
 * Package Name : jpa.service.synchro.staging.log
 * File Name : VwUserColumnServices.java
 * TODO
 */
package jpa.service.synchro.staging.log;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.persistence.EntityManager;
import jpa.entitys.synchro.staging.logs.VwUserColumn;
import jpa.service.synchro.common.JPAService;

/**
 * @author chatree
 *
 */
public class VwUserColumnServices extends JPAService {

	/**
	 * @param em
	 */
	public VwUserColumnServices(EntityManager em) {
		super(em);
		// TODO Auto-generated constructor stub
	}


	public VwUserColumn findById(String id) throws Exception {		
		
		return super.ConvertToYoureObject(super.find(id, "VwUserColumn.findById"));
	}
	
	public List<VwUserColumn> findAll() throws Exception {
		Map<String,Object> mapWhereValue = new HashMap<String, Object>();		
		return super.ConvertToYoureObject(super.findAll("VwUserColumn.findAll"));		
	}
	

	public List<VwUserColumn> findByTable(String tableName) throws Exception {		
		
		Map<String,Object> mapWhereValue = new HashMap<String, Object>();
		mapWhereValue.put("tableName", tableName);
		
		return super.ConvertToYoureObject(super.find("VwUserColumn.findByTable", mapWhereValue));
	}
}
